package com.example.mapper;

import com.example.entity.Storyboardfiles;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 陈昌吉
 * @since 2024-04-16
 */
@Mapper
public interface StoryboardfilesMapper extends BaseMapper<Storyboardfiles> {


    /**
     * 根据学生id去获取上传的Script作业
     *
     * @param currentId
     * @param hid
     * @return
     */
    @Select("select * from storyboardfiles where login_id=#{currentId} and hid=#{hid}")
    List<Storyboardfiles> selectStory(Integer currentId, Integer hid);

    @Select("select * from storyboardfiles where login_id=#{loginId} and hid=#{hid}")
    List<Storyboardfiles> selectStorys(Storyboardfiles a);

    @Delete("delete from storyboardfiles where sid=#{sid} and login_id=#{loginId}")
    void deleteStory(Storyboardfiles storyboardfiles);

    List<Storyboardfiles> getState(Integer currentId, ArrayList<Integer> hids);
    List<Storyboardfiles> selectStory1(Storyboardfiles storyboardfiles);

    /**
     * 审核对提交的作业进行审核
     * @param storyboardfiles
     * @return
     */
    Integer updateState(Storyboardfiles storyboardfiles);
}
